/**
 * 
 */
package qemese;

import java.util.ArrayList;
import java.util.List;

import qemese.ticket.Ticket;
import qemese.ticketMachine.TicketMachine;

/**
 * @author Pawel
 * 
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		TicketMachine ticketMachine = new TicketMachine();
		List<ActionObject> options = new ArrayList<ActionObject>();
		options.addAll(ticketMachine.getTicketList());
		options.add(new PrintAmount());
		while (true) {
			InputReader reader = new InputReader();
			System.out.println("Opcje:");
			
			int i = 1;
			for (ActionObject ao : options) {
				System.out.println(i + " : " + ao.toString());
				i++;
			}
			System.out.println("Wybierz opcję:");
			int option = Integer.parseInt(reader.read());

			options.get(option - 1).doAction(ticketMachine);
		}
	}

}
